import pymysql

conn = pymysql.connect(
        user='root',
        password="123",
        host='localhost',
        database='db01'
)
cursor = conn.cursor()
cursor.execute("select * from student")
result = cursor.fetchall()
print(result)
conn.close()